function checkExecutableSkill_Catharsis(obj)  
{
	if (!obj) return false;

	local isUseSkill = obj.sq_IsUseSkill(SKILL_CATHARSIS );
	if (isUseSkill) 
	{

		obj.getVar("GLOBAL_PARAMETER_CANCEL").set_vector(0,0);
		local pIntVec = sq_GetGlobalIntVector();
		sq_IntVectorClear(pIntVec);
		sq_IntVectorPush(pIntVec, 0);			
		obj.addSetStatePacket(STATE_CATHARSIS , pIntVec,  STATE_PRIORITY_USER, false, "");
		return true;
	}
	return false;
}

function checkCommandEnable_Catharsis(obj)
{


	return true;
}


function preLoad_Catharsis(obj)
{
	local level = sq_GetSkillLevel(obj, SKILL_CATHARSIS);
	if (level > 0)
	{


		createFristAnimationPooledObject(obj,
		"character/swordman/effect/animation/atcatharsis/attack01/attack01hitfront_02.ani");
		createFristAnimationPooledObject(obj,
		"character/swordman/effect/animation/atcatharsis/attack01/attack01hitback_00.ani");
		createFristAnimationPooledObject(obj,
		"character/swordman/effect/animation/atcatharsis/jumpattack/jumpattackfront_01.ani");
		createFristAnimationPooledObject(obj,
		"character/swordman/effect/animation/atcatharsis/attack02/shockbottom_00.ani");
		createFristAnimationPooledObject(obj,
		"character/swordman/effect/animation/atcatharsis/attack02/dustsparkfront_04.ani");
		createFristAnimationPooledObject(obj,
		"character/swordman/effect/animation/atcatharsis/attack02/dustback_00.ani");
		createFristAnimationPooledObject(obj,
		"passiveobject/zrr_skill/atswordman/animation/atcatharsis/tonado/tonadostartdustfront_00.ani");
		createFristAnimationPooledObject(obj,
		"passiveobject/zrr_skill/atswordman/animation/atcatharsis/tonado/tonadostartdustback_00.ani");
		createFristAnimationPooledObject(obj,
		"passiveobject/zrr_skill/atswordman/animation/atcatharsis/tonado/tanadoback_18.ani");
		createFristAnimationPooledObject(obj,
		"passiveobject/zrr_skill/atswordman/animation/atcatharsis/tonado/tonadofront_04.ani");

	}
}



function onEndState_Catharsis(obj,new_state)
{

	if (new_state != STATE_CATHARSIS)
	{
	
		if (CNSquirrelAppendage.sq_IsAppendAppendage(obj, "character/atswordman/catharsis/ap_catharsischainappendage.nut"))
			CNSquirrelAppendage.sq_RemoveAppendage(obj, "character/atswordman/catharsis/ap_catharsischainappendage.nut");

	
		obj.setShowEquipmentLayer(ENUM_EQUIPMENTTYPE_WEAPON, true);

		if (obj.getZPos() < 0)
			sq_setCurrentAxisPos(obj, 2,0);
		
	}

}



function onSetState_Catharsis(obj, state, datas, isResetTimer)
{

	obj.sq_StopMove();
	local state = obj.sq_GetVectorData(datas, 0);
	obj.setSkillSubState(state);
	
	if (state == 0)
	{
	
		obj.getVar("soundRandom").clear_vector();
		obj.getVar("soundRandom").push_vector( sq_getRandom(0,100).tointeger() );
		//< 50 A
		//> 50 B

		obj.sq_SetCurrentAnimation(  CUSTOM_ANI_CATHARSIS_DASH_ATTACK_ANI );
		obj.sq_SetCurrentAttackInfo( ATTACKINFO_CATHARSIS_DASH );

		if (obj.getVar("soundRandom").get_vector(0) < 50)
			playSoundTime(obj,"SW_CATHARSIS_01_A",100);
		
		local speed = 1600;
		obj.sq_SetStaticMoveInfo(0, speed, speed, false);	
		obj.sq_SetMoveDirection(obj.getDirection(), ENUM_DIRECTION_NEUTRAL);
		

		obj.getVar("dama2").clear_obj_vector();
		obj.getVar("flag").clear_vector();
		obj.getVar("flag").push_vector(0);
	
		local attackInfo = sq_GetCurrentAttackInfo(obj);
        local power = obj.sq_GetPowerWithPassive(SKILL_CATHARSIS, STATE_CATHARSIS, 0,-1,1.0);	 
        sq_SetCurrentAttackPower(attackInfo, power );	

		local currentAttackInfo = sq_GetCurrentAttackInfo(obj);
		sq_SetCurrentAttackeHitStunTime(currentAttackInfo, 0);

		
	}else if (state == 1)
	{
	
	
		local target = obj.getVar("dama2").get_obj_vector(0);
	
		if (target)
		{

			obj.flashScreenOnlyMe(obj,[500,1000,500],[0,0,0,178],2);

			//obj.setCurrentPos(target.getXPos(),target.getYPos(),0);
			obj.sq_SetfindNearLinearMovablePos(target.getXPos() ,target.getYPos() + 1,obj.getXPos() , obj.getYPos(), 10);
			obj.sq_SetCurrentAttackInfo( ATTACKINFO_CATHARSIS_KINFE );

			//
			local attackInfo = sq_GetCurrentAttackInfo(obj);
			local power = obj.sq_GetPowerWithPassive(SKILL_CATHARSIS, STATE_CATHARSIS, 1,-1,1.0);	 
			sq_SetCurrentAttackPower(attackInfo, power );	
			
			sq_SendHitObjectPacketWithNoStuck(obj,target,0,0,0);
		

			local masterAppendage = CNSquirrelAppendage.sq_AppendAppendage(target, obj, SKILL_BLACK_OUT , 
			false, 
			"character/atswordman/catharsis/ap_catharsis.nut", true);		

			CreateCatharsisAttack01_attackhitFront(obj,target);
			CreateCatharsisAttack01_attackhitBack(obj,target);

		}
		

		
		obj.sq_SetCurrentAnimation(  CUSTOM_ANI_CATHARSIS_ATTACK1 );
		obj.getVar("flag").clear_vector();
		obj.getVar("flag").push_vector(0);		

		local pAni = obj.sq_GetCurrentAni();
		pAni.setSpeedRate(200.0 );


		local attackInfo = sq_GetCurrentAttackInfo(obj);
        local power = obj.sq_GetPowerWithPassive(SKILL_CATHARSIS, STATE_CATHARSIS, 1,-1,1.0);	 
        sq_SetCurrentAttackPower(attackInfo, power );	

		local currentAttackInfo = sq_GetCurrentAttackInfo(obj);
		sq_SetCurrentAttackeHitStunTime(currentAttackInfo, 0);

	}else if (state == 2)
	{

		obj.getVar("move").clear_vector();
		obj.getVar("move").push_vector(obj.getXPos());
		obj.getVar("move").push_vector(obj.getYPos());
		obj.getVar("move").push_vector(obj.getZPos());
		obj.getVar("move").push_vector(325);
		obj.getVar("move").push_vector(0);
		obj.getVar("move").push_vector(305);

		obj.sq_SetCurrentAnimation(  CUSTOM_ANI_CATHARSIS_JUMP );

		obj.getVar("flag").clear_vector();
		obj.getVar("flag").push_vector(0);
		obj.getVar("flag").push_vector(0);
		obj.getVar("flag").push_vector(0);
		obj.getVar("flag").push_vector(0);
		obj.getVar("flag").push_vector(0);
		obj.getVar("flag").push_vector(0);
		obj.getVar("flag").push_vector(0);	
		
		local target = obj.getVar("dama2").get_obj_vector(0);
		if (target)
		{


			local masterAppendage = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, 14, false, 
			"character/atswordman/catharsis/ap_catharsischainappendage.nut", true);	

			local vector = 0;

			masterAppendage.getVar("lineTarget_" + vector).clear_obj_vector();
			masterAppendage.getVar("lineTarget_" + vector).push_obj_vector( target );

			masterAppendage.getVar("lineVar" + vector).clear_vector();
			masterAppendage.getVar("lineVar" + vector).push_vector(600);
			masterAppendage.getVar("lineVar" + vector).push_vector(100);
			masterAppendage.getVar("lineVar" + vector).push_vector(10);
			masterAppendage.getVar("lineVar" + vector).push_vector(1);
			masterAppendage.getVar("lineVar" + vector).push_vector(0);

			masterAppendage.getVar("lineObject" + vector).clear_obj_vector();
			masterAppendage.getVar("SizeVectorFlag").set_vector(0, vector + 1 );
		}

		local pAni = obj.sq_GetCurrentAni();
		pAni.setSpeedRate(150.0 );

	}else if (state == 3)
	{
	
		obj.sq_SetCurrentAnimation(  CUSTOM_ANI_CATHARSIS_JUMP_FALL_DOWN );
		
		obj.getVar("move").clear_vector();
		obj.getVar("move").push_vector(obj.getXPos());
		obj.getVar("move").push_vector(obj.getYPos());
		obj.getVar("move").push_vector(obj.getZPos());
		obj.getVar("move").push_vector(-325);
		obj.getVar("move").push_vector(0);
		obj.getVar("move").push_vector(-obj.getZPos());

		local pAni = obj.sq_GetCurrentAni();
		pAni.setSpeedRate(150.0 );

	}else if (state == 4)
	{

		if (obj.getVar("soundRandom").get_vector(0) < 50)
			playSoundTime(obj,"SW_CATHARSIS_03_A",100);
		else
			playSoundTime(obj,"SW_CATHARSIS_03_B",100);

		if (CNSquirrelAppendage.sq_IsAppendAppendage(obj, "character/atswordman/catharsis/ap_catharsischainappendage.nut"))
			CNSquirrelAppendage.sq_RemoveAppendage(obj, "character/atswordman/catharsis/ap_catharsischainappendage.nut");


		local target = obj.getVar("dama2").get_obj_vector(0);
		if (target)
		{
			if (CNSquirrelAppendage.sq_IsAppendAppendage(target, "character/atswordman/catharsis/ap_catharsis.nut"))
				CNSquirrelAppendage.sq_RemoveAppendage(target, "character/atswordman/catharsis/ap_catharsis.nut");
		}

		sq_setCurrentAxisPos(obj, 2,0);
		obj.sq_SetCurrentAnimation(  CUSTOM_ANI_CATHARSIS_ATTACK2 );
		obj.sq_SetCurrentAttackInfo( ATTACKINFO_CATHARSIS_SLASH );

		local attackInfo = sq_GetCurrentAttackInfo(obj);
        local power = obj.sq_GetPowerWithPassive(SKILL_CATHARSIS, STATE_CATHARSIS, 2,-1,1.0);	 
        sq_SetCurrentAttackPower(attackInfo, power );	

		CreateCatharsisAttack2BottomShock(obj);
		
		obj.getVar("flag").clear_vector();
		obj.getVar("flag").push_vector(0);
		obj.getVar("flag").push_vector(0);
		obj.getVar("flag").push_vector(0);

		obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED,
		SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0);

		local currentAttackInfo = sq_GetCurrentAttackInfo(obj);
		sq_SetCurrentAttackeHitStunTime(currentAttackInfo, 0);
	}
	
}

function onAttack_Catharsis(obj, damager, boundingBox, isStuck)
{

	local state = obj.getSkillSubState();
	if (state == 0)
	{
		if (damager.isObjectType(OBJECTTYPE_ACTIVE))
		{
		
			obj.getVar("dama2").push_obj_vector( damager );
			local pIntVec = sq_GetGlobalIntVector();
			sq_IntVectorClear(pIntVec);
			sq_IntVectorPush(pIntVec, 1);			
			obj.addSetStatePacket(STATE_CATHARSIS , pIntVec,  STATE_PRIORITY_USER, false, "");
		
		}
	}else if (state == 1)
	{

	}else if (state == 2)

	{
	}else if (state == 3)

	{
	}else if (state == 4)
	{
		createBladerHitEffectBlueCross(obj,damager);
		if (damager.isObjectType(OBJECTTYPE_ACTIVE))
		{
			local masterAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, 14, false, 
			"character/atswordman/catharsis/ap_cataharsis_trraction.nut", true);	
		}
	}

}


function onProc_Catharsis(obj)
{

	local state = obj.getSkillSubState();
	if (state == 0)
	{

		local pAni = obj.sq_GetCurrentAni();
		local frmIndex = obj.sq_GetCurrentFrameIndex(pAni);

		if (frmIndex >= 2 && obj.getVar("flag").get_vector(0) == 0)
		{
			obj.getVar("flag").set_vector(0,1);
			local speed = 0;
			obj.sq_SetStaticMoveInfo(0, speed, speed, false);	
			obj.sq_SetMoveDirection(obj.getDirection(), ENUM_DIRECTION_NEUTRAL);
		}

	}else if (state == 1)
	{
	
		local pAni = obj.sq_GetCurrentAni();
		local frmIndex = obj.sq_GetCurrentFrameIndex(pAni);

		if (frmIndex >= 2 && obj.getVar("flag").get_vector(0) == 0)
		{
			obj.getVar("flag").set_vector(0,1);
			local dstX = sq_GetDistancePos(obj.getXPos(), obj.getDirection(), 50);
			if( obj.isMovablePos(dstX, obj.getYPos() ))
			{
				sq_setCurrentAxisPos(obj, 0, dstX);
				sq_setCurrentAxisPos(obj, 1,  obj.getYPos() );
			}
			sq_setCurrentAxisPos(obj, 2,  80 );
			CreateCatharsisJumpAttack_(obj,obj);
		}
	
	}else if (state == 2)
	{

		local pAni = obj.sq_GetCurrentAni();
		local frmIndex = obj.sq_GetCurrentFrameIndex(pAni);



		{
			local startFrameIndex = 0;
			local endFrameIndex = 2;

			local startX = obj.getVar("move").get_vector(0);
			local startY = obj.getVar("move").get_vector(1);
			local startZ = obj.getVar("move").get_vector(2);
			
			local vx = obj.getVar("move").get_vector(3);
			local vy = obj.getVar("move").get_vector(4);
			local vz = obj.getVar("move").get_vector(5);

			local currentT = sq_GetCurrentTime(pAni);
			if (frmIndex <= startFrameIndex)
			{
			
			}else if (frmIndex >= startFrameIndex && frmIndex <= endFrameIndex)
			{

				if (obj.getVar("flag").get_vector(3) == 0)
				{
					//CreateCatharsisLandToMonsterEffect(obj);
					obj.getVar("flag").set_vector(3,1);
				}

				currentT = currentT - pAni.getDelaySum(0,startFrameIndex);
				local maxT = pAni.getDelaySum(startFrameIndex,endFrameIndex);
				if (currentT < maxT)
				{
					local vx1 = sq_GetUniformVelocity(0, vx, currentT,maxT);
					local vy1 = sq_GetUniformVelocity(0, vy, currentT,maxT);
					local vz1 = sq_GetUniformVelocity(0, vz, currentT,maxT);
					local dstX = sq_GetDistancePos(startX, obj.getDirection(), vx1);

					if( obj.isMovablePos(dstX, startY + vy1 ))
					{
						sq_setCurrentAxisPos(obj, 0, dstX);
						sq_setCurrentAxisPos(obj, 1, startY + vy1);
					}
					sq_setCurrentAxisPos(obj, 2, startZ + vz1);
				}
			}else
			{
				if (obj.getVar("flag").get_vector(0) == 0)
				{
					obj.getVar("flag").set_vector(0,1)
					obj.getVar("move").clear_vector();
					obj.getVar("move").push_vector(obj.getXPos());
					obj.getVar("move").push_vector(obj.getYPos());
					obj.getVar("move").push_vector(obj.getZPos());
					obj.getVar("move").push_vector(-30);
					obj.getVar("move").push_vector(0);
					obj.getVar("move").push_vector(40);
				}
			}
		}



		{
			local startFrameIndex = 2;
			local endFrameIndex = 3;

			local startX = obj.getVar("move").get_vector(0);
			local startY = obj.getVar("move").get_vector(1);
			local startZ = obj.getVar("move").get_vector(2);
			
			local vx = obj.getVar("move").get_vector(3);
			local vy = obj.getVar("move").get_vector(4);
			local vz = obj.getVar("move").get_vector(5);

			local currentT = sq_GetCurrentTime(pAni);
			if (frmIndex <= startFrameIndex)
			{
			
			}else if (frmIndex >= startFrameIndex && frmIndex <= endFrameIndex)
			{

				currentT = currentT - pAni.getDelaySum(0,startFrameIndex);
				local maxT = pAni.getDelaySum(startFrameIndex,endFrameIndex);
				if (currentT < maxT)
				{
					local vx1 = sq_GetUniformVelocity(0, vx, currentT,maxT);
					local vy1 = sq_GetUniformVelocity(0, vy, currentT,maxT);
					local vz1 = sq_GetUniformVelocity(0, vz, currentT,maxT);
					local dstX = sq_GetDistancePos(startX, obj.getDirection(), vx1);

					if( obj.isMovablePos(dstX, startY + vy1 ))
					{
						sq_setCurrentAxisPos(obj, 0, dstX);
						sq_setCurrentAxisPos(obj, 1, startY + vy1);
					}
					sq_setCurrentAxisPos(obj, 2, startZ + vz1);
				}
			}else
			{
				if (obj.getVar("flag").get_vector(1) == 0)
				{
					obj.getVar("flag").set_vector(1,1)
					obj.getVar("move").clear_vector();
					obj.getVar("move").push_vector(obj.getXPos());
					obj.getVar("move").push_vector(obj.getYPos());
					obj.getVar("move").push_vector(obj.getZPos());
					obj.getVar("move").push_vector(-100);
					obj.getVar("move").push_vector(0);
					obj.getVar("move").push_vector(-100 );
				}else
				{
					if (frmIndex <= 4)
					{
						for (local i = 0;i<3;i++)
							sq_setCurrentAxisPos(obj, i, obj.getVar("move").get_vector(i) );
					}
				}
			}
		}



		{
			local startFrameIndex = 4;
			local endFrameIndex = 99;
			
			local startX = obj.getVar("move").get_vector(0);
			local startY = obj.getVar("move").get_vector(1);
			local startZ = obj.getVar("move").get_vector(2);
			
			local vx = obj.getVar("move").get_vector(3);
			local vy = obj.getVar("move").get_vector(4);
			local vz = obj.getVar("move").get_vector(5);



			local currentT = sq_GetCurrentTime(pAni);

			currentT = currentT - pAni.getDelaySum(0,startFrameIndex);
			local maxT = 100;
			
			if (currentT > 0 )
			{
				if (currentT < maxT)
				{



					local vx1 = sq_GetUniformVelocity(0, vx, currentT,maxT);
					local vy1 = sq_GetUniformVelocity(0, vy, currentT,maxT);
					local vz1 = sq_GetUniformVelocity(0, vz, currentT,maxT);
					local dstX = sq_GetDistancePos(startX, obj.getDirection(), vx1);

					if( obj.isMovablePos(dstX, startY + vy1 ))
					{
						sq_setCurrentAxisPos(obj, 0, dstX);
						sq_setCurrentAxisPos(obj, 1, startY + vy1);
					}
					sq_setCurrentAxisPos(obj, 2, startZ + vz1);
					

					
				}else
				{	
					//sq_setCurrentAxisPos(obj, 2, 0);
					local pIntVec = sq_GetGlobalIntVector();
					sq_IntVectorClear(pIntVec);
					sq_IntVectorPush(pIntVec, 3);			
					obj.addSetStatePacket(STATE_CATHARSIS , pIntVec,  STATE_PRIORITY_USER, false, "");
				
				}
			}
			
		}
		
		
		if (frmIndex >= 0 && obj.getVar("flag").get_vector(2) == 0)
		{
			obj.getVar("flag").set_vector(2,1);
			obj.sq_setShakeOnlyMe(obj,5,150);
			
		}
		
		
		//

	}else if (state == 3)
	{
	
		local pAni = obj.sq_GetCurrentAni();
		local frmIndex = obj.sq_GetCurrentFrameIndex(pAni);
		
		{
			local startFrameIndex = 0;
			local endFrameIndex = 99;
			
			local startX = obj.getVar("move").get_vector(0);
			local startY = obj.getVar("move").get_vector(1);
			local startZ = obj.getVar("move").get_vector(2);
			
			local vx = obj.getVar("move").get_vector(3);
			local vy = obj.getVar("move").get_vector(4);
			local vz = obj.getVar("move").get_vector(5);



			local currentT = sq_GetCurrentTime(pAni);

			currentT = currentT - pAni.getDelaySum(0,startFrameIndex);
			local maxT = 100;
			
			if (currentT > 0 )
			{
				if (currentT < maxT)
				{
					local vx1 = sq_GetUniformVelocity(0, vx, currentT,maxT);
					local vy1 = sq_GetUniformVelocity(0, vy, currentT,maxT);
					local vz1 = sq_GetUniformVelocity(0, vz, currentT,maxT);
					local dstX = sq_GetDistancePos(startX, obj.getDirection(), vx1);

					if( obj.isMovablePos(dstX, startY + vy1 ))
					{
						sq_setCurrentAxisPos(obj, 0, dstX);
						sq_setCurrentAxisPos(obj, 1, startY + vy1);
					}
					sq_setCurrentAxisPos(obj, 2, startZ + vz1);
					
				}else
				{	
					//sq_setCurrentAxisPos(obj, 2, 0);
					local pIntVec = sq_GetGlobalIntVector();
					sq_IntVectorClear(pIntVec);
					sq_IntVectorPush(pIntVec, 4);			
					obj.addSetStatePacket(STATE_CATHARSIS , pIntVec,  STATE_PRIORITY_USER, false, "");
				
				}
			}
		
		}
	}else if (state == 4)
	{
		local pAni = obj.sq_GetCurrentAni();
		local frmIndex = obj.sq_GetCurrentFrameIndex(pAni);
		
		
		if (frmIndex >= 0 && obj.getVar("flag").get_vector(0) == 0)
		{
			obj.getVar("flag").set_vector(0,1);
			obj.sq_setShakeOnlyMe(obj,15,200);
			obj.flashScreenOnlyMe(obj,[50,100,50],[255,255,255,178],2);
			
		}

		if (frmIndex >= 1 && obj.getVar("flag").get_vector(1) == 0)
		{
			CreateCatharsisAttack2DustParkFront(obj);
			CreateCatharsisAttack2DustParkBack(obj);

			local attackBonusRate = obj.sq_GetPowerWithPassive(SKILL_CATHARSIS, STATE_CATHARSIS, 3,-1,1.0);
			obj.sq_StartWrite();
			obj.sq_WriteDword(attackBonusRate);
			obj.sq_WriteDword(260);
			obj.sq_WriteDword(100);
			obj.sq_SendCreatePassiveObjectPacket(24357, 0,0, 1,0);
			CreateCatharsisStartTorodoEffectFront(obj);
			CreateCatharsisStartTorodoEffectBACK(obj);
			CreateCatharsisTorodoEffectBACK(obj);
			obj.getVar("flag").set_vector(1,1);

			
		}

	}
}


function onEndCurrentAni_Catharsis(obj)
{

	local state = obj.getSkillSubState();
	if (state == 0)
	{
	
		local pIntVec = sq_GetGlobalIntVector();
		sq_IntVectorClear(pIntVec);
		sq_IntVectorPush(pIntVec, 0);			
		obj.addSetStatePacket(0 , pIntVec,  STATE_PRIORITY_USER, false, "");
	
	}else if (state == 1)
	{
	
		local pIntVec = sq_GetGlobalIntVector();
		sq_IntVectorClear(pIntVec);
		sq_IntVectorPush(pIntVec, 2);			
		obj.addSetStatePacket(STATE_CATHARSIS , pIntVec,  STATE_PRIORITY_USER, false, "");
	}else if (state == 2)
	{
	

	}else if (state == 3)
	{
		local pIntVec = sq_GetGlobalIntVector();
		sq_IntVectorClear(pIntVec);
		sq_IntVectorPush(pIntVec, 4);			
		obj.addSetStatePacket(STATE_CATHARSIS , pIntVec,  STATE_PRIORITY_USER, false, "");
	}else if (state == 4)
	{

		sq_SendMessage(obj,OBJECT_MESSAGE_INVINCIBLE,1,0);
		sq_PostDelayedMessage(obj,OBJECT_MESSAGE_INVINCIBLE,0,0,500 );
		local pIntVec = sq_GetGlobalIntVector();
		sq_IntVectorClear(pIntVec);
		sq_IntVectorPush(pIntVec, 2);			
		obj.addSetStatePacket(0 , pIntVec,  STATE_PRIORITY_USER, false, "");
	}
	
}

function getScrollBasisPos_Catharsis(obj)
{
	if (!obj) return;
	local subState = obj.getSkillSubState();
	
}



function CreateCatharsisAttack01_attackhitFront(obj,damager)
{

	if(!obj || !sq_IsMyControlObject(obj) )
	return ;

	local ani = sq_CreateAnimation("",
	"character/swordman/effect/animation/atcatharsis/attack01/attack01hitfront_02.ani");
	local pooledObj = sq_CreatePooledObject(ani,true);
//	pooledObj = sq_SetEnumDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
	local posX = sq_GetDistancePos(damager.getXPos(), obj.getDirection(), 0);
	pooledObj.setCurrentPos(posX  ,damager.getYPos() + 1,damager.getZPos() + damager.getObjectHeight() / 2);
	pooledObj.setCurrentDirection(obj.getDirection());
	sq_AddObject(obj,pooledObj,2,false);	

}

function CreateCatharsisAttack01_attackhitBack(obj,damager)
{

	if(!obj || !sq_IsMyControlObject(obj) )
	return ;

	local ani = sq_CreateAnimation("",
	"character/swordman/effect/animation/atcatharsis/attack01/attack01hitback_00.ani");
	local pooledObj = sq_CreatePooledObject(ani,true);
//	pooledObj = sq_SetEnumDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
	local posX = sq_GetDistancePos(damager.getXPos(), obj.getDirection(), 0);
	pooledObj.setCurrentPos(posX  ,damager.getYPos() - 1,damager.getZPos() + damager.getObjectHeight() / 2);
	pooledObj.setCurrentDirection(obj.getDirection());
	sq_AddObject(obj,pooledObj,2,false);	

}

function CreateCatharsisJumpAttack_(obj,damager)
{

	if(!obj || !sq_IsMyControlObject(obj) )
	return ;

	local ani = sq_CreateAnimation("",
	"character/swordman/effect/animation/atcatharsis/jumpattack/jumpattackfront_01.ani");
	local pooledObj = sq_CreatePooledObject(ani,true);
//	pooledObj = sq_SetEnumDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
	local posX = sq_GetDistancePos(damager.getXPos(), obj.getDirection(), 0);
	pooledObj.setCurrentPos(posX  ,damager.getYPos() + 1,0);
	pooledObj.setCurrentDirection(obj.getDirection());
	sq_AddObject(obj,pooledObj,2,false);	

}

function CreateCatharsisLandToMonsterEffect(obj)
{

	if(!obj || !sq_IsMyControlObject(obj) )
	return ;

	local ani = sq_CreateAnimation("",
	"character/swordman/effect/animation/atcatharsis/landingattackline_01.ani");
	local pooledObj = sq_CreatePooledObject(ani,true);
//	pooledObj = sq_SetEnumDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
	local posX = sq_GetDistancePos(obj.getXPos(), obj.getDirection(), 0);
	pooledObj.setCurrentPos(posX  ,obj.getYPos() + 1,obj.getZPos() );
	pooledObj.setCurrentDirection(obj.getDirection());
	sq_AddObject(obj,pooledObj,2,false);	
	
	sq_SetCustomRotate(pooledObj,sq_ToRadian(-135.0));	

}


function CreateCatharsisAttack2BottomShock(obj)
{

	if(!obj || !sq_IsMyControlObject(obj) )
	return ;

	local ani = sq_CreateAnimation("",
	"character/swordman/effect/animation/atcatharsis/attack02/shockbottom_00.ani");
	local pooledObj = sq_CreatePooledObject(ani,true);
	pooledObj = sq_SetEnumDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
	local posX = sq_GetDistancePos(obj.getXPos(), obj.getDirection(), 0);
	pooledObj.setCurrentPos(posX  ,obj.getYPos() + 1,obj.getZPos() );
	pooledObj.setCurrentDirection(obj.getDirection());
	sq_AddObject(obj,pooledObj,2,false);	


}



function CreateCatharsisAttack2DustParkFront(obj)
{

	if(!obj || !sq_IsMyControlObject(obj) )
	return ;

	local ani = sq_CreateAnimation("",
	"character/swordman/effect/animation/atcatharsis/attack02/dustsparkfront_04.ani");
	local pooledObj = sq_CreatePooledObject(ani,true);
	//pooledObj = sq_SetEnumDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
	local posX = sq_GetDistancePos(obj.getXPos(), obj.getDirection(), 0);
	pooledObj.setCurrentPos(posX  ,obj.getYPos() + 5,obj.getZPos() );
	pooledObj.setCurrentDirection(obj.getDirection());
	sq_AddObject(obj,pooledObj,2,false);	


}




function CreateCatharsisAttack2DustParkBack(obj)
{

	if(!obj || !sq_IsMyControlObject(obj) )
	return ;

	local ani = sq_CreateAnimation("",
	"character/swordman/effect/animation/atcatharsis/attack02/dustback_00.ani");
	local pooledObj = sq_CreatePooledObject(ani,true);
	//pooledObj = sq_SetEnumDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
	local posX = sq_GetDistancePos(obj.getXPos(), obj.getDirection(), 0);
	pooledObj.setCurrentPos(posX  ,obj.getYPos() - 2,obj.getZPos() );
	pooledObj.setCurrentDirection(obj.getDirection());
	sq_AddObject(obj,pooledObj,2,false);	


}




function CreateCatharsisStartTorodoEffectFront(obj)
{

	if(!obj || !sq_IsMyControlObject(obj) )
	return ;

	local ani = sq_CreateAnimation("",
	"passiveobject/zrr_skill/atswordman/animation/atcatharsis/tonado/tonadostartdustfront_00.ani");
	local pooledObj = sq_CreatePooledObject(ani,true);
	//pooledObj = sq_SetEnumDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
	local posX = sq_GetDistancePos(obj.getXPos(), obj.getDirection(), 0);
	pooledObj.setCurrentPos(posX  ,obj.getYPos() + 2,obj.getZPos() );
	pooledObj.setCurrentDirection(obj.getDirection());
	sq_AddObject(obj,pooledObj,2,false);	


}



function CreateCatharsisStartTorodoEffectBACK(obj)
{

	if(!obj || !sq_IsMyControlObject(obj) )
	return ;

	local ani = sq_CreateAnimation("",
	"passiveobject/zrr_skill/atswordman/animation/atcatharsis/tonado/tonadostartdustback_00.ani");
	local pooledObj = sq_CreatePooledObject(ani,true);
	//pooledObj = sq_SetEnumDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
	local posX = sq_GetDistancePos(obj.getXPos(), obj.getDirection(), 0);
	pooledObj.setCurrentPos(posX  ,obj.getYPos() -1,obj.getZPos() );
	pooledObj.setCurrentDirection(obj.getDirection());
	sq_AddObject(obj,pooledObj,2,false);	


}

function CreateCatharsisTorodoEffectBACK(obj)
{

	if(!obj || !sq_IsMyControlObject(obj) )
	return ;

	local ani = sq_CreateAnimation("",
	"passiveobject/zrr_skill/atswordman/animation/atcatharsis/tonado/tanadoback_18.ani");
	local pooledObj = sq_CreatePooledObject(ani,true);
	//pooledObj = sq_SetEnumDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
	local posX = sq_GetDistancePos(obj.getXPos(), obj.getDirection(), 0);
	pooledObj.setCurrentPos(posX  ,obj.getYPos() -1,obj.getZPos() );
	pooledObj.setCurrentDirection(obj.getDirection());
	sq_AddObject(obj,pooledObj,2,false);	


}